<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动及其定位3</title>
    <style>
        html,
        body {
            width: 100%;
            height: 100%;
        }

        .box1 {
            width: 20%;
            height: 100%;
            margin: auto;
            float: left;
            background-image: url(image/天猫人物.webp);
            background-size: cover;
            position: relative;
            text-indent: 120px;
        }

        .box2 {
            background-image: url(image/商品2.webp);
            background-size: cover;
            width: 25%;
            height: 50%;
            margin: auto;
            display: inline-block;
            position: relative;
            text-indent: 120px;
            /* float: left; */

        }

        .box3 {
            background-image: url(image/商品3.webp);
            background-size: cover;
            width: 25%;
            height: 50%;
            display: inline-block;
            margin: auto;
            /* float: left; */
            position: relative;
            text-indent: 120px;
        }

        .box4 {
            background-image: url(image/商品4.webp);
            background-size: cover;
            width: 25%;
            height: 50%;
            margin: auto;
            /* float: left; */
            position: relative;
            text-indent: 120px;
            display: inline-block;

        }

        .box5 {
            background-image: url(image/商品6.webp);
            background-size: cover;
            width: 20%;
            height: 50%;
            margin: auto;
            /* float: left; */
            display: inline-block;
            position: relative;
            text-indent: 120px;
        }

        .box6 {
            background-image: url(image/商品7.webp);
            background-size: cover;
            width: 25%;
            height: 50%;
            margin: auto;
            /* float: left; */
            position: relative;
            text-indent: 120px;
            display: inline-block;

        }

        .box7 {
            background-image: url(image/商品8.webp);
            background-size: cover;
            width: 25%;
            height: 50%;
            margin: auto;
            /* float: left; */
            position: relative;
            text-indent: 120px;
            display: inline-block;

        }

        .box8 {
            background-image: url(image/商品9.webp);
            background-size: cover;
            width: 25%;
            height: 50%;
            margin: auto;
            /* float: left; */
            display: inline-block;
            position: relative;
            text-indent: 120px;
        }

        .box9 {
            background-image: url(image/商品10.webp);
            background-size: cover;
            width: 20%;
            height: 50%;
            margin: auto;
            /* float: left; */
            display: inline-block;
            position: relative;
            text-indent: 120px;
        }

        .container {
            width: 80%;
            height: 100%;
            display: inline-block;
            overflow: hidden;
        }

        p {
            bottom: 0;
            height: 0;
            transition: all 0.3s ease;
            overflow: hidden;
            position: absolute;
            background-color: azure;
            color: red;
            opacity: 50%;
            width: 100%;
            margin: 0;
        }

        .box:hover p {
            height: 25%;
        }
        .box{
            cursor: pointer;
        }
    </style>
</head>

<body>
    <div class="box box1">
        <p>$100000</p>
    </div>
    <div class="container">
        <div class="box box2">
            <p>$250</p>
        </div>
        <div class="box box3">
            <p>$699</p>
        </div>
        <div class="box box4">
            <p>$899</p>
        </div>
        <div class="box box5">
            <p>$299</p>
        </div>
        <div class="box box6">
            <p>$89</p>
        </div>
        <div class="box box7">
            <p>$79</p>
        </div>
        <div class="box box8">
            <p>$69</p>
        </div>
        <div class="box box9" >
            <p>$648</p>
        </div>
    </div>
<script>
    var box=document.querySelector(".box")
    var box2=document.querySelector(".container")
    box.onclick=function(){
        confirm("余额不足,你的账户已被冻结，请到缅北解冻")
    }
    box2.onclick=function(){
        confirm("余额不足,你的账户已被冻结，请到缅北解冻")
    }
</script>
</body>

</html>